package com.yicong.ants.bean.circle;

import android.view.View;

/**
 * @author cch
 * @version 2020/11/3
 */
public class PricingInfoItem {
    /*
    [
        'position'         => 'app_index_mall_product',
        'name'             => 'App首页推荐',
        'bill_type'        => 'daily',
        'base'             => 0.3,
        'min_qty'          => 30,
        'position_preview' => 'http://ant.qiniu.yblylm.com/ad_preview_app_index.jpg',
        'bill_type_text'   => '按天计费',
        'display_type'     => 'default',
    ]
     */
    String position;
    String position_preview;
    String name;
    // 【cpc】单次点击收费
    // 【cpm】千次展示收费
    // 【daily】天数
    String bill_type;
    String bill_type_text;
    String exchange_title;
    String action_text;
    String content_title_text;
    boolean mall_product_position;
    float base;
    int min;
    float gender;
    float age_amount_1;
    float age_amount_2;
    float age_amount_3;
    float age_amount_4;
    float address_amount_1;
    float address_amount_2;
    float address_amount_3;
    String display_type;
    int display_width;
    int display_height;
    int visible_video_play;
    boolean show_upload_field;

    public PricingInfoItem() {
    }

    public int getVisible_video_play() {
        if ("video".equals(display_type)) {
            return View.VISIBLE;
        }
        return View.GONE;
    }

    public String getAction_text() {
        switch (bill_type) {
            case "cpc":
                return "点击";
            case "cpm":
                return "展示";
            case "daily":
                return "天数";
        }
        return "点击";
    }

    public String getContent_title_text() {
        switch (position) {
            case "mall_index":
            case "app_index_mall_product":
                return "填写商城商品链接";
        }
        return "广告内容链接";
    }

    public boolean isMall_product_position() {
        return display_type.equals("mall_product");
    }

    public String getExchange_title() {
        switch (bill_type) {
            case "cpc":
                return "兑换点击次数";
            case "cpm":
                return "兑换展示次数";
            case "daily":
                return "兑换展示天数";
        }
        return "兑换展示天数";
    }

    public String getPosition() {
        return this.position;
    }

    public String getPosition_preview() {
        return this.position_preview;
    }

    public String getName() {
        return this.name;
    }

    public String getBill_type() {
        return this.bill_type;
    }

    public String getBill_type_text() {
        return this.bill_type_text;
    }

    public float getBase() {
        return this.base;
    }

    public int getMin() {
        return this.min;
    }

    public float getGender() {
        return this.gender;
    }

    public float getAge_amount_1() {
        return this.age_amount_1;
    }

    public float getAge_amount_2() {
        return this.age_amount_2;
    }

    public float getAge_amount_3() {
        return this.age_amount_3;
    }

    public float getAge_amount_4() {
        return this.age_amount_4;
    }

    public float getAddress_amount_1() {
        return this.address_amount_1;
    }

    public float getAddress_amount_2() {
        return this.address_amount_2;
    }

    public float getAddress_amount_3() {
        return this.address_amount_3;
    }

    public String getDisplay_type() {
        return this.display_type;
    }

    public int getDisplay_width() {
        return this.display_width;
    }

    public int getDisplay_height() {
        return this.display_height;
    }

    public boolean isShow_upload_field() {
        return this.show_upload_field;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public void setPosition_preview(String position_preview) {
        this.position_preview = position_preview;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setBill_type(String bill_type) {
        this.bill_type = bill_type;
    }

    public void setBill_type_text(String bill_type_text) {
        this.bill_type_text = bill_type_text;
    }

    public void setExchange_title(String exchange_title) {
        this.exchange_title = exchange_title;
    }

    public void setAction_text(String action_text) {
        this.action_text = action_text;
    }

    public void setContent_title_text(String content_title_text) {
        this.content_title_text = content_title_text;
    }

    public void setMall_product_position(boolean mall_product_position) {
        this.mall_product_position = mall_product_position;
    }

    public void setBase(float base) {
        this.base = base;
    }

    public void setMin(int min) {
        this.min = min;
    }

    public void setGender(float gender) {
        this.gender = gender;
    }

    public void setAge_amount_1(float age_amount_1) {
        this.age_amount_1 = age_amount_1;
    }

    public void setAge_amount_2(float age_amount_2) {
        this.age_amount_2 = age_amount_2;
    }

    public void setAge_amount_3(float age_amount_3) {
        this.age_amount_3 = age_amount_3;
    }

    public void setAge_amount_4(float age_amount_4) {
        this.age_amount_4 = age_amount_4;
    }

    public void setAddress_amount_1(float address_amount_1) {
        this.address_amount_1 = address_amount_1;
    }

    public void setAddress_amount_2(float address_amount_2) {
        this.address_amount_2 = address_amount_2;
    }

    public void setAddress_amount_3(float address_amount_3) {
        this.address_amount_3 = address_amount_3;
    }

    public void setDisplay_type(String display_type) {
        this.display_type = display_type;
    }

    public void setDisplay_width(int display_width) {
        this.display_width = display_width;
    }

    public void setDisplay_height(int display_height) {
        this.display_height = display_height;
    }

    public void setVisible_video_play(int visible_video_play) {
        this.visible_video_play = visible_video_play;
    }

    public void setShow_upload_field(boolean show_upload_field) {
        this.show_upload_field = show_upload_field;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof PricingInfoItem)) return false;
        final PricingInfoItem other = (PricingInfoItem) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$position = this.getPosition();
        final Object other$position = other.getPosition();
        if (this$position == null ? other$position != null : !this$position.equals(other$position))
            return false;
        final Object this$position_preview = this.getPosition_preview();
        final Object other$position_preview = other.getPosition_preview();
        if (this$position_preview == null ? other$position_preview != null : !this$position_preview.equals(other$position_preview))
            return false;
        final Object this$name = this.getName();
        final Object other$name = other.getName();
        if (this$name == null ? other$name != null : !this$name.equals(other$name)) return false;
        final Object this$bill_type = this.getBill_type();
        final Object other$bill_type = other.getBill_type();
        if (this$bill_type == null ? other$bill_type != null : !this$bill_type.equals(other$bill_type))
            return false;
        final Object this$bill_type_text = this.getBill_type_text();
        final Object other$bill_type_text = other.getBill_type_text();
        if (this$bill_type_text == null ? other$bill_type_text != null : !this$bill_type_text.equals(other$bill_type_text))
            return false;
        final Object this$exchange_title = this.getExchange_title();
        final Object other$exchange_title = other.getExchange_title();
        if (this$exchange_title == null ? other$exchange_title != null : !this$exchange_title.equals(other$exchange_title))
            return false;
        final Object this$action_text = this.getAction_text();
        final Object other$action_text = other.getAction_text();
        if (this$action_text == null ? other$action_text != null : !this$action_text.equals(other$action_text))
            return false;
        final Object this$content_title_text = this.getContent_title_text();
        final Object other$content_title_text = other.getContent_title_text();
        if (this$content_title_text == null ? other$content_title_text != null : !this$content_title_text.equals(other$content_title_text))
            return false;
        if (this.isMall_product_position() != other.isMall_product_position()) return false;
        if (Float.compare(this.getBase(), other.getBase()) != 0) return false;
        if (this.getMin() != other.getMin()) return false;
        if (Float.compare(this.getGender(), other.getGender()) != 0) return false;
        if (Float.compare(this.getAge_amount_1(), other.getAge_amount_1()) != 0) return false;
        if (Float.compare(this.getAge_amount_2(), other.getAge_amount_2()) != 0) return false;
        if (Float.compare(this.getAge_amount_3(), other.getAge_amount_3()) != 0) return false;
        if (Float.compare(this.getAge_amount_4(), other.getAge_amount_4()) != 0) return false;
        if (Float.compare(this.getAddress_amount_1(), other.getAddress_amount_1()) != 0)
            return false;
        if (Float.compare(this.getAddress_amount_2(), other.getAddress_amount_2()) != 0)
            return false;
        if (Float.compare(this.getAddress_amount_3(), other.getAddress_amount_3()) != 0)
            return false;
        final Object this$display_type = this.getDisplay_type();
        final Object other$display_type = other.getDisplay_type();
        if (this$display_type == null ? other$display_type != null : !this$display_type.equals(other$display_type))
            return false;
        if (this.getDisplay_width() != other.getDisplay_width()) return false;
        if (this.getDisplay_height() != other.getDisplay_height()) return false;
        if (this.getVisible_video_play() != other.getVisible_video_play()) return false;
        if (this.isShow_upload_field() != other.isShow_upload_field()) return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof PricingInfoItem;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $position = this.getPosition();
        result = result * PRIME + ($position == null ? 43 : $position.hashCode());
        final Object $position_preview = this.getPosition_preview();
        result = result * PRIME + ($position_preview == null ? 43 : $position_preview.hashCode());
        final Object $name = this.getName();
        result = result * PRIME + ($name == null ? 43 : $name.hashCode());
        final Object $bill_type = this.getBill_type();
        result = result * PRIME + ($bill_type == null ? 43 : $bill_type.hashCode());
        final Object $bill_type_text = this.getBill_type_text();
        result = result * PRIME + ($bill_type_text == null ? 43 : $bill_type_text.hashCode());
        final Object $exchange_title = this.getExchange_title();
        result = result * PRIME + ($exchange_title == null ? 43 : $exchange_title.hashCode());
        final Object $action_text = this.getAction_text();
        result = result * PRIME + ($action_text == null ? 43 : $action_text.hashCode());
        final Object $content_title_text = this.getContent_title_text();
        result = result * PRIME + ($content_title_text == null ? 43 : $content_title_text.hashCode());
        result = result * PRIME + (this.isMall_product_position() ? 79 : 97);
        result = result * PRIME + Float.floatToIntBits(this.getBase());
        result = result * PRIME + this.getMin();
        result = result * PRIME + Float.floatToIntBits(this.getGender());
        result = result * PRIME + Float.floatToIntBits(this.getAge_amount_1());
        result = result * PRIME + Float.floatToIntBits(this.getAge_amount_2());
        result = result * PRIME + Float.floatToIntBits(this.getAge_amount_3());
        result = result * PRIME + Float.floatToIntBits(this.getAge_amount_4());
        result = result * PRIME + Float.floatToIntBits(this.getAddress_amount_1());
        result = result * PRIME + Float.floatToIntBits(this.getAddress_amount_2());
        result = result * PRIME + Float.floatToIntBits(this.getAddress_amount_3());
        final Object $display_type = this.getDisplay_type();
        result = result * PRIME + ($display_type == null ? 43 : $display_type.hashCode());
        result = result * PRIME + this.getDisplay_width();
        result = result * PRIME + this.getDisplay_height();
        result = result * PRIME + this.getVisible_video_play();
        result = result * PRIME + (this.isShow_upload_field() ? 79 : 97);
        return result;
    }

    public String toString() {
        return "PricingInfoItem(position=" + this.getPosition() + ", position_preview=" + this.getPosition_preview() + ", name=" + this.getName() + ", bill_type=" + this.getBill_type() + ", bill_type_text=" + this.getBill_type_text() + ", exchange_title=" + this.getExchange_title() + ", action_text=" + this.getAction_text() + ", content_title_text=" + this.getContent_title_text() + ", mall_product_position=" + this.isMall_product_position() + ", base=" + this.getBase() + ", min=" + this.getMin() + ", gender=" + this.getGender() + ", age_amount_1=" + this.getAge_amount_1() + ", age_amount_2=" + this.getAge_amount_2() + ", age_amount_3=" + this.getAge_amount_3() + ", age_amount_4=" + this.getAge_amount_4() + ", address_amount_1=" + this.getAddress_amount_1() + ", address_amount_2=" + this.getAddress_amount_2() + ", address_amount_3=" + this.getAddress_amount_3() + ", display_type=" + this.getDisplay_type() + ", display_width=" + this.getDisplay_width() + ", display_height=" + this.getDisplay_height() + ", visible_video_play=" + this.getVisible_video_play() + ", show_upload_field=" + this.isShow_upload_field() + ")";
    }
}
